package com.ruoyi.mes.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * BOM物料联系对象 pro_bom_material
 *
 * @author coderChen
 * @date 2024-05-23
 */
public class ProBomMaterial extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 物料id */
    @Excel(name = "物料id")
    private Long matId;

    /** 物料数量 */
    @Excel(name = "物料数量")
    private Long matNum;

    /** 产品编码 */
    @Excel(name = "产品编码")
    private String proSn;

    /** 产品名称 */
    @Excel(name = "产品名称")
    private String proName;

    public String getMatName() {
        return matName;
    }

    public void setMatName(String matName) {
        this.matName = matName;
    }
    public void setProSn(String proSn)
    {
        this.proSn = proSn;
    }

    public String getProSn()
    {
        return proSn;
    }
    public void setProName(String proName)
    {
        this.proName = proName;
    }

    public String getProName()
    {
        return proName;
    }

    /** 物料名称 */
    private String matName;

    public String getMatSn() {
        return matSn;
    }

    public void setMatSn(String matSn) {
        this.matSn = matSn;
    }

    /** 物料编号 */
    private String matSn;

    public int getMatPrice() {
        return matPrice;
    }

    public void setMatPrice(int matPrice) {
        this.matPrice = matPrice;
    }

    /** 物料价格 */
    private int matPrice;

    public ProMateriel getProMateriel() {
        return proMateriel;
    }

    /** 物料表的成员 */
    private ProMateriel proMateriel;

    /** bom_id */
    @Excel(name = "bom_id")
    private Long bomId;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setMatId(Long matId)
    {
        this.matId = matId;
    }

    public Long getMatId()
    {
        return matId;
    }
    public void setMatNum(Long matNum)
    {
        this.matNum = matNum;
    }

    public Long getMatNum()
    {
        return matNum;
    }
    public void setBomId(Long bomId)
    {
        this.bomId = bomId;
    }

    public Long getBomId()
    {
        return bomId;
    }

    @Override
    public String toString() {
//        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
//                .append("id", getId())
//                .append("matId", getMatId())
//                .append("matNum", getMatNum())
//                .append("bomId", getBomId())
//                .toString();
        ToStringBuilder ts = new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE);

        ts.append("matId", getMatId())
                .append("matNum", getMatNum())
                .append("bomId", getBomId())
                .append("matName", proMateriel.getMatName())
                .append("matSn", proMateriel.getMatSn())
                .append("matPrice", proMateriel.getMatPrice());


                return ts.toString();
    }
}
